IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tr_ProjectEmailFile_Ins]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tr_ProjectEmailFile_Ins]
GO

CREATE PROCEDURE [dbo].[tr_ProjectEmailFile_Ins]
	@EntryDt VARCHAR(MAX),
	@ProjectId UNIQUEIDENTIFIER,
	@FileLocation VARCHAR(MAX),
	@EmailId UNIQUEIDENTIFIER,
	@FileName VARCHAR(MAX),
	@MimeType VARCHAR(MAX),
	@FileData VARBINARY(MAX)

AS

INSERT INTO tr_File 
	(EntryDt, ProjectId, FileLocation, EmailId, FileName, MimeType, FileData) VALUES
	(@EntryDt, @ProjectId, @FileLocation, @EmailId, @FileName, @MimeType, @FileData)
